﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CMP.ERP.Model;
using CMP.ERP.DAL;

namespace CMP.ERP.BLL
{
    public class CommodityTypeBLL
    {
        CommodityTypeDAL dal = new CommodityTypeDAL();
        /// <summary>
        /// 获取商品品牌信息
        /// </summary>
        /// <returns></returns>
        public List<CommodityType> GetCommandTypeAll()
        {
            return dal.GetCommandTypeAll();
        }
        /// <summary>
        /// 根据商品品牌获取商品信息
        /// </summary>
        /// <returns></returns>
        public List<Commodity> GetCommodityByCtid(int id)
        {
            return dal.GetCommodityByCtid(id);
        }
        /// <summary>
        /// 添加商品品牌
        /// </summary>
        /// <param name="e"></param>
        /// <returns></returns>
        public int AddCommodityType(CommodityType ct)
        {
            return dal.AddCommodityType(ct);
        }
        /// <summary>
        /// 根据id获取单行品牌信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public CommodityType GetCtById(int id)
        {
            return dal.GetCtById(id);
        }
        /// <summary>
        /// 更新商品品牌信息
        /// </summary>
        /// <param name="ct"></param>
        /// <returns></returns>
        public int EditCommodityType(CommodityType ct)
        {
            return dal.EditCommodityType(ct);
        }
        /// <summary>
        /// 删除商品品牌
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public int DelCommodityType(int id)
        {
            return dal.DelCommodityType(id);
        }
    }
}
